﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleAppQ2
{
    class Program
    {
        static void Main(string[] args)
        {


            Queue queue1 = new Queue(30);
            queue1.Enqueue("小明");
            queue1.Enqueue("小黄");
            queue1.Enqueue("小智");
            var que = queue1.ToArray();
            foreach (var item in que)
            {
                Console.WriteLine(item);
            }



            Queue queue = new Queue();
            queue.Enqueue("aaa");
            queue.Enqueue("bbb");
            queue.Enqueue("ccc");

            var que2 = queue.ToArray();
            foreach (var item1 in que2)


            {
                Console.WriteLine(item1);
            }



            IEnumerator enumerator = queue.GetEnumerator();
            while (enumerator.MoveNext())


            {
                Console.WriteLine(enumerator.Current);
            }
        }
    }
}